// 登录框框
<template>
    <div id='login-box-container'>
        <h2>登录</h2>
        <Divider />
        用户名/电子邮箱/手机号码
        <Input class="login-text" size="large" placeholder="请输入用户名/电子邮箱/手机号码" v-model="token" @on-blur="checkToken"/>
        <div class="login-tips" v-for="(item, index) in tokenCheck" :key="`token-tip-${index}`">
            {{ item }}
        </div>
        登录密码
        <Input class="login-text" size="large" placeholder="请输入登陆密码" @on-blur="checkPasswd" v-model="passwd" type="password" />
        <div class="login-tips" v-for="(item, index) in passwdCheck" :key="`passwd-tip-${index}`">
            {{ item }}
        </div>
        <router-link to="/login" style="float: right">忘记密码</router-link>
        <div class="login-submit">
            <Button type="primary" shape="circle" size="large" @click="doLogin()" :disabled="canLogin()">
                登录
            </Button>
        </div>
        <div class="login-unsign">
            尚未创建账号? <span @click="$emit('on-click')">立即创建!</span>
        </div>
    </div>
</template>

<script lang='ts'>
import { LoginBox } from "./Index";
export default LoginBox;
</script>

<style lang='scss' scoped>
@import './Index.scss';
</style>